<%@page import="com.ilibrary.constants.MyConstants"%>
<%@page import="com.ilibrary.web.vo.AdminVO"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="_common.jsp" %>
<title>登录页</title>
<link href="<%=request.getContextPath() %>/template_css/login/login.css" rel="stylesheet" type="text/css">
</head>

<%
	String loginError = (String)request.getAttribute("loginError");
%>

<body>
<div id="page">
  <div id="page-inner">
    <div id="header">
      <div id="logo"></div>
    </div>
    <div id="content-wrapper">
      <div id="content">
        <div id="login">
       		<div style="color: red;width: 60%;margin-left: 20%;">
			<%
				if(loginError != null) {
					out.println(loginError);
				}
			%>
			</div>
			<form action="<%=request.getContextPath() %>/doLogin.action" style="margin:0px;display: inline;" name="Login" method="post" onsubmit="return doLogin();">
	            <div id="login-inner">
	              <p>
	                <label>用户名：</label>
	                <input id="userId" name="userId" type="text">
	              </p>
	              <p>
	                <label>密&nbsp;&nbsp;&nbsp;码：</label>
	                <input id="userPassword" name=userPassword type="password">
	              </p>
				  <p>
				  	<label>身&nbsp;&nbsp;&nbsp;份：</label>
				  		<input type="radio" name="userType" checked="checked" value="<%=MyConstants.ILIBRARY_LOGIN_TYPE_STU%>">学生
						<input type="radio" name="userType" value="<%=MyConstants.ILIBRARY_LOGIN_TYPE_ADMIN%>">管理员<br>
				  </p>
	              <p><span id="button">
	                  <input style="float: left;margin-left: 90px;" class="button" id="login_btn" value="" type="submit">
	                	<!-- <input class="button" id="forgetpassword_btn" type="button"> -->
	                </span>
	              </p>
	              <p>
	              	<span id="link">
						<span style="margin-left:45px;padding-top:30px;font-size:14px;text-align:right;">
							咨询电话：028-88888888
						</span>
					</span>	
				  </p> 
	            </div>
            </form>
        </div>
      </div>
    </div>
    <div id="footer">
      <div id="copyright">建设单位：成信院网络信息中心</div>
    </div>
  </div>
</div>
</body>

<script type="text/javascript">
	function doLogin() {
		var userId = $('#userId').val();
		var userPassword = $('#userPassword').val();
		var userType = $('input[name="userType"]').val();
		if(!userId) {
			alert("请填入登录用户名！");
			return false;
		}
		if(!userPassword){
			alert("请输入登录密码！");
			return false;
		}
		if(!userType) {
			alert("请选择用户类型！");
			return false;
		}
		$('#loginForm').submit();
	}
	function reset() {
		$('#loginForm').reset();
	}
</script>

</html>